<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Constructs the EvIdle watcher object</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="class.evidle.html">« EvIdle</a></li>
      <li style="float: right;"><a href="evidle.createstopped.html">EvIdle::createStopped »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.evidle.html">EvIdle</a></li>
    <li>Constructs the EvIdle watcher object</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="evidle.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">EvIdle::__construct</h1>
  <p class="verinfo">(PECL ev &gt;= 0.2.0)</p><p class="refpurpose"><span class="refname">EvIdle::__construct</span> &mdash; <span class="dc-title">Constructs the EvIdle watcher object</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-evidle.construct-description">
  <h3 class="title">说明</h3>
  <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><strong>EvIdle::__construct</strong></span>(<span class="methodparam">
    <span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span>
     <code class="parameter">$callback</code>
   </span>, <span class="methodparam">
    <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span>
     <code class="parameter">$data</code>
   <span class="initializer"> = ?</span></span>, <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$priority</code>
   <span class="initializer"> = ?</span></span>)</div>

  <p class="para rdfs-comment">
   Constructs the EvIdle watcher object and starts the watcher automatically.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-evidle.construct-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>

     <code class="parameter">callback</code>
    </dt>

    <dd>

     <p class="para">
      See
      <a href="ev.watcher-callbacks.html" class="link">Watcher callbacks</a>
      .
     </p>
    </dd>

   
   
    <dt>

     <code class="parameter">data</code>
    </dt>

    <dd>

     <p class="para">
      Custom data associated with the watcher.
     </p>
    </dd>

   
   
    <dt>

     <code class="parameter">priority</code>
    </dt>

    <dd>

     <p class="para">
      <a href="class.ev.html#ev.constants.watcher-pri" class="link">Watcher priority</a>
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 seealso" id="refsect1-evidle.construct-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member">
    <span class="methodname"><a href="evidle.createstopped.html" class="methodname" rel="rdfs-seeAlso">EvIdle::createStopped()</a> - Creates instance of a stopped EvIdle watcher object</span>
   </li>
   <li class="member">
    <span class="methodname"><a href="evloop.idle.html" class="methodname" rel="rdfs-seeAlso">EvLoop::idle()</a> - Creates EvIdle watcher object associated with the current event
  loop instance</span>
   </li>
  </ul>
 </div>

</div></div></div></body></html>